package com.ly.blog2backup.service.impl;

import com.ly.blog2Common.utils.FileUtils;
import com.ly.blog2Common.utils.StringUtils;
import com.ly.blog2backup.constants.FileConstants;
import com.ly.blog2backup.service.FileService;
import com.ly.blog2backup.utils.ImageFileUtils;
import org.springframework.stereotype.Service;

/**
 * @author: lyMaster
 * @time: 2020/7/28 16:29
 */
@Service
public class FileServiceImpl implements FileService {
    @Override
    public String uploadBase64(String base64) {
        String imgName = StringUtils.getUUIDNumber();
        return ImageFileUtils.saveImgFileByBase64(base64,FileConstants.ARTICLE_FOLDER,imgName);
    }
}
